<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>伪类</title>
    <!-- 悬停的文字是蓝色 -->
    <style>
        a:hover { 
            color: aqua;
        }
        /* 悬停到div时是红色 */
        div:hover {
            color: red;
        }
    </style>
</head>

<body>
    <a href="#">这是a标签</a>
    <div>div</div>
</body>

</html>